package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.Cart;
import com.xca.znb.entity.Goods;
import com.xca.znb.entity.Local;
import com.xca.znb.model.imodel.ICartClearing;

public class CartClearingImpl implements ICartClearing {
    private UserDAO userDAO ;
    public CartClearingImpl(Context context){
        userDAO = new UserDAO(context);
    }
    @Override
    public Local getLocalById(int id) {
        return userDAO.getLocalById(id);
    }

    @Override
    public Cart getCartById(int id) {
        return userDAO.getCartById(id);
    }

    @Override
    public void updateCartNumById(int id, int num) {
        userDAO.updateCartNumById(id, num);
    }

    @Override
    public Goods getGoodsById(int id) {
        return userDAO.getGoodsById(id);
    }
}
